package com.zeus.data.jdbc;

import com.github.pagehelper.PageHelper;
import org.apache.ibatis.session.SqlSessionFactory;
import org.mybatis.spring.boot.autoconfigure.MybatisAutoConfiguration;
import org.springframework.boot.autoconfigure.AutoConfigureBefore;
import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author magic
 * @date 2018/9/28/028 13:37
 * @version 1.0
 * Description PageHelperAutoConfiguration
 */
@Configuration
@AutoConfigureBefore(MybatisAutoConfiguration.class)
public class PageHelperAutoConfiguration {

    @Bean
    @ConditionalOnClass(MybatisAutoConfiguration.class)
    public PageHelper pageHelper(){
        return new PageHelper();
    }
}
